package com.woniu.HisHospitalizationApi;

import com.woniu.dto.HisOrderFormDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.HisOrderFormAddParam;
import com.woniu.param.HisOrderFormParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        value = "his-hospitalization",
        contextId = "HisOrderForm")
@Api(tags = "住院的医嘱接口")
public interface HisOrderFormApi {

    //-------------------关于医嘱记录操作-------------------
    //新增医嘱
    @ApiOperation("新增医嘱")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisOrderFormAddParam",
//                    value = "医嘱对象",
//                    required = false,
//                    dataType = "hisOrderFormAddParam")
//    })
    @PostMapping("addHisOrderForm")
    public Result<HisOrderFormDto> addHisOrderForm(@RequestBody HisOrderFormAddParam hisOrderFormAddParam);

    //删除医嘱根据id
    @ApiOperation("根据id删除医嘱")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "医嘱id",
//                    required = false,
//                    dataType = "arraylist")
//    })
    @DeleteMapping("deleteOrderForm")
    public Result<Boolean> deleteHisOrderForm(@RequestParam("id") ArrayList<Integer> id);

    //修改医嘱
    @ApiOperation("修改医嘱")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisOrderFormParam",
//                    value = "医嘱对象",
//                    required = false,
//                    dataType = "hisOrderFormParam")
//    })
    @PutMapping("updateHisOrderForm")
    public Result<HisOrderFormDto> updateHisOrderForm(@RequestBody HisOrderFormParam hisOrderFormParam);

    //查询所有医嘱记录
    @ApiOperation("查询所有医嘱")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "",
//                    value = "",
//                    required = false,
//                    dataType = "")
//    })
    @GetMapping("getAllHisOrderForm")
    public Result<PageDTO<HisOrderFormDto>> getAllHisOrderForm();

    //查询医嘱
    @ApiOperation("查询医嘱")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "查询参数",
//                    required = false,
//                    dataType = "arrlist" )
//    })
    @PostMapping("getAllHisOrderFormBy")
    public Result<PageDTO<HisOrderFormDto>> getAllHisOrderFormBy(@RequestBody HisOrderFormParam hisOrderFormParam);

}
